﻿var library = (function () {
    HTMLEnCode = function (str) {
        var s = "";
        if (str.length == 0) return "";
        s = str.replace(/&/g, "&gt;");
        s = s.replace(/</g, "&lt;");
        s = s.replace(/>/g, "&gt;");
        s = s.replace(/ /g, "&nbsp;");
        s = s.replace(/\'/g, "'");
        s = s.replace(/\"/g, "&quot;");
        s = s.replace(/\n/g, " <br>");
        return s;
    }
    HTMLDeCode = function (str) {
        var s = "";
        if (str.length == 0) return "";
        s = str.replace(/&gt;/g, "&");
        s = s.replace(/&lt;/g, "<");
        s = s.replace(/&gt;/g, ">");
        s = s.replace(/&nbsp;/g, " ");
        s = s.replace(/'/g, "\'");
        s = s.replace(/&quot;/g, "\"");
        s = s.replace(/ <br>/g, "\n");
        return s;
    }
    return {
        Common: (function () {
            return function () {
                this.Redirect = function (url) {
                    window.location.href = url;
                    if (jQuery.browser.version == '6.0') {
                        window.event.returnValue = false;
                    }
                };
            }
        })()
    }
})();
